<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>SLL_Application</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</h:head>
<h:body>
	<p:layout fullPage="true">
		<p:layoutUnit position="north" collapsible="false" closable="false"
			resizable="false" size="120">
			<ui:insert name="header">
				<p:layout>
					<p:layoutUnit position="center" style="border: none;">
						<h2 style="font-size: 1.2em;">
							<ui:insert name="title">
                    			SLL - Shared Links Library
                    		</ui:insert>
						</h2>
						<p:outputLabel style="font-size: .6em;"
							value="Angemeldet als: #{loginBean.currentUser.username}"
							rendered="#{loginBean.loggedIn}" />
					</p:layoutUnit>
					<h:form>
						<p:layoutUnit position="east" style="border: none;">
							<p:themeSwitcher value="#{themeSwitcherBean.theme}"
								style="width:175px" effect="fade" id="statefulSwitcher">
								<f:selectItem itemLabel="Choose Theme" itemValue="" />
								<f:selectItems value="#{themeSwitcherBean.themes}" />
								<p:ajax />
							</p:themeSwitcher>
						</p:layoutUnit>
					</h:form>
				</p:layout>
			</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="west" collapsible="false" closable="false"
			resizable="false" size="250">
			<ui:insert name="menu">
				<h:form>
					<p:menu style="width: 220px;">
						<p:menuitem value="Login" action="#{navigationBean.LOGIN()}"
							rendered="#{!loginBean.loggedIn}" ajax="false" />
						<p:menuitem value="Mein Profil"
							action="#{navigationBean.EDITUSER()}"
							rendered="#{loginBean.loggedIn}" ajax="false">
							<f:param name="username"
								value="#{loginBean.currentUser.username}" />
						</p:menuitem>
						<p:menuitem value="Links" action="#{navigationBean.LINKS()}"
							rendered="#{loginBean.loggedIn}" ajax="false" />
						<p:menuitem value="Benutzerverwaltung"
							action="#{navigationBean.USERLIST()}"
							rendered="#{loginBean.getCurrentUser().admin}" ajax="false" />
						<p:menuitem value="Logout" action="#{loginBean.doLogout()}"
							rendered="#{loginBean.loggedIn}" ajax="false" />
					</p:menu>
				</h:form>
			</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="center" id="container">
			<p:growl id="messageGrowl" />
			<ui:insert name="content">Default content</ui:insert>
		</p:layoutUnit>
		<p:layoutUnit position="south" size="50">
			<p:layout>
				<p:layoutUnit position="west" style="Border: none;" size="300">Shared Links Library</p:layoutUnit>
				<p:layoutUnit position="center"
					style="Border: none; text-align: center;">FFHS / JEE</p:layoutUnit>
				<p:layoutUnit position="east" style="Border: none;">Benjamin Bäni</p:layoutUnit>
			</p:layout>
		</p:layoutUnit>
	</p:layout>
</h:body>
</html>